<?php
/**
 * Created by PhpStorm.
 * User: 123
 * Date: 2021/7/1
 * Time: 8:50
 */
namespace app\adminapi\controller;

use app\common\controller\AdminApi;

/**
 * 订单
 * Class Order
 * @package app\adminapi\controller
 */
class Order extends AdminApi
{
    protected $noNeedLogin = '';
    protected $noNeedRight = ['*'];

    /**
     * 列表
     */
    public function list()
    {
        $postData = json_decode(request()->getContent(), true);

        // 数据验证
        $result = $this->validate($postData, 'OrderList');
        if (true !== $result) {
            // 验证失败 输出错误信息
            $this->error($result);
        }

        $data = \app\common\model\Order::getList($postData);
        $this->success('查询成功', $data);
    }
}